package com.recharge.core.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.recharge.core.entity.GoodsGroupEntity;
import com.recharge.core.entity.GoodsMerchantEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Reagan
 * @since 2020-09-28
 */
@Mapper
public interface GoodsMerchantMapper extends BaseMapper<GoodsMerchantEntity> {
    /**
     * 自定义实现分页
     * @param page
     * @param wrapper
     * @return
     */
    IPage<GoodsMerchantEntity> selectOtherPage(Page<GoodsMerchantEntity> page,@Param("ew") QueryWrapper<GoodsMerchantEntity> wrapper);

    List<GoodsGroupEntity> selectGoodsGroupByMerchantId(String merchantId);

    /**
     * 根据条件查询列表
     * @param wrapper
     * @return
     */
    List<GoodsMerchantEntity> selectList(@Param("ew") QueryWrapper<GoodsMerchantEntity> wrapper);
}
